{include file="common/header" title="登录"}

<h2>注册</h2>
<p>账号:<input type="text" name="username" id="username" value="" /></p>
<p>密码:<input type="password" name="password" id="password" value="" /></p>
<p>所属分组:<input type="text" name="group_id" id="group_id" value="" /></p>
<input type="submit" value="注册" id="regbtn" />

<script type="text/javascript">
	$(document).ready(function(){
		$('#regbtn').click(function(){
			var username = $('#username').val()
			var password = $('#password').val()
			var group_id = $('#group_id').val()
			if(!username || !password){
				alert('请输入账号密码')
				return
			}
			$.post('/admin/api/sessions',{username:username,password:password},function(rs){
				console.log(rs)
				alert(rs.meeeage)
				if(rs.status){
					
				}
			})
		})
	})
</script>

{include file="common/footer"}
